<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
<div ng-app="" ng-init="quantity=1;price=5">
    <h2>价格计算器</h2>
    数量：<input type="number" ng-model="quantity">
    价格：<input type="number" ng-model="price">
    <p><b>总价：</b>{{ quantity * price }}</p>
</div>
</body>
</html>